package com.geega.geetest.enums;

/**
 * @author wdx
 * @date 2021/9/8 21:33
 */
public enum ErrorEnum {

    SUCCESS("0000", "success"),
    //1000以下为系统级错误
    SYSTEM_ERROR("0001", "system error"),
    FIELD_IS_NULL_ERROR("0002","字段不允许为空"),
    LOGIN_CAPTCHA_ERROR("0003","登录失败，验证码错误"),
    LOGIN_TYPE_NULL_ERROR("0004","登录失败，类型不可为空"),
    LOGIN_TYPE_ERROR("0005","登录失败，不支持的登录类型"),
    LOGIN_PASSWORD_ERROR("0006","登录失败，密码错误"),
    NOT_LOGIN_ERROR("0010","未登录"),
    NOT_BIND_ERROR("0011","账号未绑定"),
    NULL_VAL_CHECK_ERROR("0020","空值效验异常：%s"),
    NO_SAVE_PERMISSION("0101","操作失败，无保存权限"),
    NO_DELETE_PERMISSION("0102","操作失败，无删除权限"),
    SAVE_FAILED_INCONSISTENT_VERSION("0110","保存失败，版本号不一致"),
    DATA_IS_DELETE("0103","操作失败，数据已被逻辑删除"),
    NO_REQUEST_HEADER("0104", "请求未添加请求头"),;

    private String code;
    private String msg;

    ErrorEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
